<% layout('/layouts/default.html', {title: '我的地址列表', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('我的地址列表')}
			</div>
			
		</div>
		<div class="box-body">
				<#form:form id="searchForm" model="${ztAddr}" action="${ctx}/ztAddr/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
					<#form:hidden path="ztAdmin.id"/>
				</#form:form>

			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>

// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	
	columnModel: [     
		
		{header:'${text('收货人')}', name:'name',index:'a.name',  width:50, align:"center"},
		
		
		{header:'${text('号码')}', name:'phone', index:'a.phone', width:70, align:"center"},
		{header:'${text('地区')}', name:'area', index:'a.area', width:340, align:"center"},
		{header:'${text('地址')}', name:'addr', index:'a.addr', width:340, align:"center"},
		
		
		{header:'${text('是否默认')}', name:'defStatus', index:'a.def_status', width:30, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel(${@DictUtils.getDictListJson('sys_yes_no')}, val, '${text('未知')}', true);
		}},
		
		{header:'${text('创建时间')}', name:'createDate', index:'a.create_date', width:80, align:"center"}
		
		
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>